package com.apsbyoptaplanner.domain;

import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.variable.PlanningVariable;

@PlanningEntity
public class Task  extends AbstractPersistable{

    private int requiredYarnType;
    private int amount;

    private Machine machine;

    public int getRequiredYarnType() {
        return requiredYarnType;
    }

    public void setRequiredYarnType(int requiredYarnType) {
        this.requiredYarnType = requiredYarnType;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    @PlanningVariable(valueRangeProviderRefs={"machineRange"})
    public Machine getMachine() {
        return machine;
    }

    public void setMachine(Machine machine) {
        this.machine = machine;
    }

    public Task(){}

    public Task(int id, int requiredYarnType, int amount) {
        super(id);
        this.requiredYarnType = requiredYarnType;
        this.amount = amount;
    }
}